package com.opennews.openplatform

class Role {
	String id
	String authority	// AKA roleName. Did not change it because 'authority' is referenced by Spring Security documents.
	String title
	String description
	Collection<UserRole> userRoles
	Date dateCreated

	//static hasMany = [userRoles: UserRole]

	static constraints = {
		authority nullable: false, blank: false, maxSize: 50, unique: true
		title nullable: false, blank: false, maxSize: 50
		description nullable: true, blank: true, maxSize: 50
	}

	static mapping = {
		cache true
	}
}